using JetBrains.Annotations;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class 背包信息显示单例<T> : MonoBehaviour where T : 背包信息显示单例<T>
{
    public static T BPiteminfo;
    protected virtual void Awake()
    {
        if (BPiteminfo != null)
        {
            Debug.Log(name + "背包信息显示单例复用");
            Destroy(gameObject);
        }
        BPiteminfo = (T)this;
        DontDestroyOnLoad(gameObject);
    }
    protected virtual void OnDestroy()
    {
        BPiteminfo = null;
    }

}
